package com.foreverwin.mes.production.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.foreverwin.mes.core.base.FrontPage;
import com.foreverwin.mes.production.mapper.WorkDayRestTimeDetailMapper;
import com.foreverwin.mes.production.model.WorkDayRestTimeDetail;
import com.foreverwin.mes.production.service.WorkDayRestTimeDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional(rollbackFor = Exception.class)
public class WorkDayRestTimeDetailServiceImpl extends ServiceImpl<WorkDayRestTimeDetailMapper, WorkDayRestTimeDetail> implements WorkDayRestTimeDetailService {


    @Autowired
    private WorkDayRestTimeDetailMapper workDayRestTimeDetailMapper;

    @Override
    public Page<WorkDayRestTimeDetail> selectPage(FrontPage<WorkDayRestTimeDetail> frontPage) {
        EntityWrapper<WorkDayRestTimeDetail> entityWrapper = new EntityWrapper<WorkDayRestTimeDetail>();
        //getEntityWrapper(entityWrapper, workDayRestTimeDetail);
        return super.selectPage(frontPage.getPagePlus(), entityWrapper);
    }

    @Override
    public List<WorkDayRestTimeDetail> selectList() {
        EntityWrapper<WorkDayRestTimeDetail> entityWrapper = new EntityWrapper<WorkDayRestTimeDetail>();
        //getEntityWrapper(entityWrapper, workDayRestTimeDetail);
        return super.selectList(entityWrapper);
    }


}